console.info('contentScript is running')
//默认发送一次
chrome.runtime.sendMessage({ type: 'bodyData', body: document.body.innerText, htmlBody: document.body.innerHTML,title:document.title});
//收到事件时在发一次
chrome.runtime.onMessage.addListener((request) => {
    console.log(request)
    if (request.type === 'getBodyData') {
        chrome.runtime.sendMessage({ type: 'bodyData', body: document.body.innerText, htmlBody: document.body.innerHTML,title:document.title });
    }
})